﻿using KPIS.GERP.SERVICE.Model;
using System.ComponentModel.DataAnnotations;

namespace KPIS.GERP.MVC.Models
{
    public class SendApproval
    {
        // "hrm_ps_employees", "absence_seq", "absence_type_seq", Common.ProcessStatus
        public string Title { get; set; }
        public int EmpSeq { get; set; }
        public int AbsenceSeq { get; set; }
        public string TableName { get; set; }
        public string ColumnSeqName { get; set; }
        public string ColumnName { get; set; }
        public string Status { get; set; }

        public SendApproval()
        {
            Title = "Title";
            TableName = "hrm_ps_absence";
            ColumnSeqName = "absence_seq";
            ColumnName = "absence_type_seq";
        }

    }

    public class ChangePasswordModel
    {
        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "รหัสผ่านปัจจุบัน")]
        public string OldPassword { get; set; }

        [Required]
        [StringLength(100, ErrorMessage = "{0} ต้องมีความยาวอย่างน้อย {2} ตัวอักษร", MinimumLength = 4)]
        [DataType(DataType.Password)]
        [Display(Name = "รหัสผ่านใหม่")]
        public string NewPassword { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "ยืนยัน รหัสผ่านใหม่")]
        [System.Web.Mvc.Compare("NewPassword", ErrorMessage = "[รหัสผ่านใหม่] และ [ยืนยัน รหัสผ่านใหม่] ไม่ตรงกัน")]
        public string ConfirmPassword { get; set; }
    }

    public class LogOnModel
    {
        [CustomRequired]
        [Display(Name = "รหัสผู้ใช้งาน")]
        public string UserName { get; set; }

        [CustomRequired]
        [DataType(DataType.Password)]
        [Display(Name = "รหัสผ่าน")]
        public string Password { get; set; }

        [Display(Name = "Remember me?")]
        public bool RememberMe { get; set; }
    }

    public class RegisterModel
    {
        [Required]
        [Display(Name = "User name")]
        public string UserName { get; set; }

        [Required]
        [DataType(DataType.EmailAddress)]
        [Display(Name = "Email address")]
        public string Email { get; set; }

        [Required]
        [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 4)]
        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Confirm password")]
        [System.Web.Mvc.Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
        public string ConfirmPassword { get; set; }
    }
}
